<!---
	Title:		EPAR1.1
	Author:		Bruce Frick
	Purpose:	Step 1 Manager Initiate Hire page
--->

<cfset BASE = CreateObject("component", "cfc.base") />
<cfset baseQueries = CreateObject("component", "#session.rootDir#.cfc.queries") />
<cfinclude template="/code_lib/SCF_Employee.cfm">
<cfinclude template="/code_lib/SCF_HR.cfm">
<cfinclude template="/code_lib/SCF_REGEX.cfm">
<cfoutput>
	<!---HTML header, css links, js links, and page title--->
    #BASE.htmlHeader(
    	"/jquery/ui-1.8.5/jquery-ui.min.js,/jquery/plugins/scrollTo/jquery.scrollTo-1.4.2-min.js,js/Step1-Hire.js", <!---JS links--->
        "/jquery/ui-1.8.5/themes/cupertino/jquery-ui.css", <!---CSS links--->
        "Step 1: Manager - Initiate Hire", <!---Page Title--->
        "Status" <!---Active Nav Link--->
    )#
    <!---HTML header, css links, js links, and page title--->


    <cfif Session.bolAuth EQ True and (Session.strAuthType EQ Session.MANAGERS or Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.Manager) >

        <!---Query objects--->
        <cfset QUERIES = {
			GetDepts = baseQueries.funcGetDepts(),
			GetSupDept = baseQueries.funcGetSupDept(Session.intHRID),
			GetAccess = baseQueries.funcGetAccess(),
			GetContainer = baseQueries.funcGetContainer(),
			GetStates = baseQueries.funcGetStates(),
			GetPhoneTypes = baseQueries.funcGetPhoneTypes(),
			GetLunch = baseQueries.funcGetLunch(),
			GetJobPostings = baseQueries.funcGetJobPostings()
		} />
        <!---Query objects--->

        <h1 class="title">Step 1:  Manager - Initiate Hire</h1>
        <div class="entry">
        	Welcome, #Session.arrEmpInfo.FirstName# #Session.arrEmpInfo.LastName#.
            In this step, we'll capture information necessary to initiate the hiring process.
            Please provide the following information: <br /><br />

            <div class="notes">
                <table>
                    <tr>
                        <td valign="top">
                            NOTE:&nbsp;&nbsp;
                        </td>
                        <td>
                           This page is for SCF employees only.
                            To process Non-SCF employees or individual contractors click <a href="non-scf/Step1-Request.cfm">here</a>.
                        </td>
                    </tr>
                </table>
            </div>


            <cfform name="frmStep1" method="post" action="api.cfm?api=insert_step1_employee">
                <table class="main">
                	<tr>
                    	<td>
                        	First, MI, Last:
                        </td>
                    	<td>
                        	<cfinput type="text" name="First"
                            	error_message="Please provide a first name."
                                tabindex="5" >

                        	<cfinput type="text" name="MI" size=1 maxlength="2"
                            	required="no" tabindex="7" >

                        	<cfinput type="text" name="Last"
                            	error_message="Please provide a last name."
                                tabindex="10" >
                        </td>
                    </tr>
                	<tr>
                    	<td>
                        	Preferred (First) Name:
                        </td>
                    	<td>
                        	<cfinput type="text" name="Preferred" tabindex="20"
                            	tooltip="Would appear in the Address Book and be used to create their network account."
                                />
                        </td>
                    </tr>
                    <tr>
                        <TD nowrap=nowrap valign='top'>
                            Phones:
                        </TD>
                        <TD colspan=3>
                            <fieldset style='border:inset'>
                                <table>
                                    <TR>
                                        <td width =10>&nbsp;

                                        </td>
                                        <TD nowrap=nowrap>
                                            Primary Phone:
                                        </TD>
                                        <TD colspan=3>
                                            <cfselect name="PhonePrimaryType" query="QUERIES.GetPhoneTypes"
                                            	value="TypeCodeIdNo" display="TypeCode"
                                                tabindex="21" />
                                        </TD>
                                    </TR>
                                    <tr>
                                        <td width =10>&nbsp;

                                        </td>
                                        <td nowrap=nowrap>
                                            Home Phone:
                                        </td>
                                        <td>
                                            <cfinput type='text' name='HomePhone' maxlength='14'
                                            	error_message="The valid home phone format is xxx-xxx-xxxx."
                                                tabindex="22" >
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width =10>&nbsp;

                                        </td>
                                        <td nowrap=nowrap>
                                            Cell Phone:
                                        </td>
                                        <td>
                                            <cfinput type='text' name='CellPhone' maxlength='14'
                                            	error_message='The valid cell phone format is xxx-xxx-xxxx.'
                                                tabindex="23" >
                                        </td>
                                    </tr>
                                    <tr>
                                        <td width =10>&nbsp;

                                        </td>
                                        <td nowrap=nowrap>
                                            Work Phone:
                                        </td>
                                        <td>
                                            <cfinput type='text' name='WorkPhone' maxlength='14'
                                            	error_message='The valid work phone format is xxx-xxx-xxxx.'
                                                tabindex="24" >
                                            x
                                             <cfinput type='text' name='WorkPhoneExt' maxlength='6'
                                             	error_message='Work Phone Extension (if provided) must be numeric.'
                                                size='7' tabindex="25" >
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                        </TD>
                    </TR>
                    <tr>
                        <td>
                            Contact Email:
                        </td>
                        <td>
                            <cfinput type="text" name="Email" maxlength="50" tabindex="28"
                            	tooltip="From the employee's application"
                            	error_message="Please provide the contact Email that appears on the employees application."
                           		style="width:98%">
                        </td>
                    </tr>
                	<tr>
                    	<td>
                        	Contact Address 1:
                        </td>
                    	<td colspan="3">
                        	<cfinput type="text" name="Address1" tabindex="30"
                            	tooltip="From the employee's application"
                            	error_message="Please provide the contact address Line that appears on the employees application."
                            	style="width:98%" >
                        </td>
                    </tr>
                	<tr>
                    	<td nowrap="nowrap">
                        	Contact Address 2:
                        </td>
                    	<td colspan="3">
                        	<cfinput type="text" name="Address2" tabindex="40" required="no"
                            	tooltip="From the employee's application"
                                style="width:98%" >
                        </td>
                    </tr>
                	<tr>
                    	<td>
                        	City, State, ZIP:
                        </td>
                    	<td colspan="3">
                        	<cfinput type="text" name="City" tabindex="41"
                            	tooltip="From the employee's application"
                                error_message="Please provide the contact address City that appears on the employees application."
                                style="width:50%" >

                            <cfselect name="State" query="QUERIES.GetStates" tabindex="42" value="LocalCodeIdNo"
                            	display="LocalCodeAbbreviation" Selected ="6" />

                            <cfinput type="text" name="ZIP" tabindex="43"
                            	tooltip="From the employee's application"
                                error_message="Please provide the contact address ZIP that appears on the employees application."
                                size='14' maxlength="10" >
                        </td>
                    </tr>
                	<tr>
                    	<td>
                        	Position to Hire:
                        </td>
                    	<td colspan=3>
                        	<cfselect name="Position" tabindex="50" style="width:98%">
                            	<cfloop query="QUERIES.GetJobPostings" >
									<cfif len(JobTitle) GT 45>
										<cfset JobTitle = "(" & Bulletin & ") " & left(JobTitle, 45) & " ... ">
									<cfelse>
										<cfset JobTitle = "(" & Bulletin & ") " & JobTitle >
									</cfif>
                                	<option value="#ID#" <cfif ID EQ 0>Selected = selected</cfif>>#JobTitle#</option>
                                </cfloop>
								<option value="-1">Other (Please Provide Comments)</option>
                            </cfselect>
                        </td>
                    </tr>
                    <TR>
                        <TD>
                            Department:
                        </TD>
                        <TD colspan=3>
                            <cfselect name="Dept" query="QUERIES.GetDepts" tabindex="60"
                            	value="OrgCodeIDNo" display="Org"
                                Selected ="#QUERIES.GetSupDept.OrgCodeIDNo#"/>
                        </TD>
                    </TR>
                    <TR>
                        <TD valign="top">
                            Comments:
                        </TD>
                        <TD colspan=3>
                            <cftextarea rows="2" tabindex="65" name="Comments" id="Comments"
                            	style="width:98%" />
                        </TD>
                    </TR>
                    <tr>
                    	<td colspan="4">
                            <fieldset>
                            <legend><strong>If Hired:</strong></legend>
                            <table>
                                <tr>
                                    <td valign="top" colspan="5">
                                        Please provide the following information to be used by the specified departments.
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top">
                                    	<BR />
                                        <strong><u>Facilities</u></strong>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top">
                                        Badge Level Access:
                                    </td>
                                    <td colspan=4>
                                        <cfselect name="Access" tabindex="70"  multiple="yes">
                                            <option value="0">-- None --</option>
                                            <cfloop query="QUERIES.GetAccess">
                                                <option value="#AccessLvID#">#Descript#</option>
                                            </cfloop>
                                        </cfselect>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top">
                                    	<BR />
                                    	<BR />
                                        <strong>
                                        	<u>Finance</u>
                                        </strong>
                                    </td>
                                </tr>
                                <tr>
                                    <td nowrap="nowrap">
                                        List of Time Card Approvers:
                                    </td>
                                    <td colspan=4>
                                        <cfinput type="text" name="TimeCardAppr" tabindex="80"
                                        	tooltip="List of Time Card Approvers (for Finance/Kronos)"
                                            style="width:98%" >
                                    </td>
                                </tr>
                                <tr>
                                    <td nowrap="nowrap">
                                        Default Cost Code:
                                    </td>
                                    <td colspan=4>
                                        <cfinput type="text" name="CostCode" tabindex="85"
                                        	error_message="Please Provide the default Cost Code"  style="width:98%" maxlength="50">
                                    </td>
                                </tr>
                                <TR>
                                    <TD>
                                        Lunch:
                                    </TD>
                                    <TD>
                                        <cfselect name="Lunch" query="QUERIES.GetLunch" tabindex="90" value="ID" display="LunchType"  />
                                    </TD>
                                </TR>
                                <TR>
                                    <TD valign="top">
                                        Eligibilty:
                                    </TD>
                                    <TD>
                                        <cfinput type="checkbox" name="Benefits" checked="no" tabindex="100"/> Benefits<BR/>

                                        <cfinput type="checkbox" name="Leave" checked="no" tabindex="110"/>Leave Accrual
                                    </TD>
                                </TR>
                                <tr>
                                    <td valign="top" colspan="3" nowrap="nowrap">
                                    	<BR />
                                    	<BR />
                                        <strong><u>Information Technology Services (ITS)</u></strong>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Network Account to Mirror:
                                    </td>
                                    <td>
                                        #SCF_Employee_ShowDropdown_AllEmployees('Mirror', 0, 1, False, True, True, 120)#
                                    </td>
                                </tr>
								<tr>
                                    <td>
                                        Phone Ext:
                                    </td>
                                    <td>
                                        <cfinput type="text" name="Phone" maxlength="6" tabindex="130"
                                        	tooltip="If a phone already exists at the employees work station, what is the 4 digit extension?"
                                            error_message="Must be numeric" />
                                    </td>
                                </tr>
                                <TR>
                                    <TD>
                                        Location/Container:
                                    </TD>
                                    <TD>
                                        <cfselect name="Container" query="QUERIES.GetContainer" tabindex="140" value="OUID" display="Container" selected="7"/>
                                    </TD>
                                </TR>
                            </table>
                            </fieldset>
                		</td>
                    </tr>
                    <tr>
                    	<td colspan="5" align="right">
                        	<cfinput type="button" name="Submit" value="Next >>" tabindex="150">
                        </td>
                    </tr>
                </table>
            </cfform>


        </div>

    <cfelse>
        <cfinclude template="Denied.cfm">
    </cfif>

    <!---HTML footer, closes html and body tags.  Any footer info goes here--->
    #BASE.htmlFooter()#
    <!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>